#include "controlfireradar.h"
#include<QDebug>

ControlFireRadar::ControlFireRadar()
{

}

ControlFireRadar::~ControlFireRadar()
{



}

bool ControlFireRadar::open()
{
    return true;
}

void ControlFireRadar::scan()
{


}

void ControlFireRadar::doWork()
{
    //生成测试命令
   YCN::Command::RadioData radio("ycn","123","foe",nullptr);

    std::shared_ptr<YCN::Command> cmd=std::make_shared<YCN::Command>("fire",radio);

   emit Device::sendDataToOtherDevice(cmd);
    qDebug()<<"send_ycn";

}


void ControlFireRadar::onOtherDevice(std::shared_ptr<YCN::Command>cmd)
{

    recv_cmd_=cmd;
    qDebug()<<"cmdType"<<recv_cmd_->cmdType;
    qDebug()<<"id"<<recv_cmd_->radioData.id_;
    qDebug()<<"name"<<recv_cmd_->radioData.name_;
}










